
# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        潘炎珍  
# Name:         demo15
# Description:
# Author:       98745
# Date:         2019/3/4
#-------------------------------------------------------------------------------
def en(n):
    try:
        for el in n:
            for e in en(el):
                yield e
    except TypeError:
        yield n
l=[4,[1,2,[3,5,6]],[4,3,[1,2,[4,5]],2],[1,2,4,5,7]]
for num in en(l):
    print(num,end=' ')
